package com.chain.galaxychain123.kotlionapp

class Man: People, Driver,Writer {



    constructor(name: String) : super(name)

    override var Skin: String="男人皮肤黑"

    override var hairStyle: String="男人短头发"

    override fun niaoniao(): String {
        return "男人站着尿尿"
    }

    override fun BodyWeight(): String? {
        return "男人重"
    }


    public  override fun write() {
        println("男人会写作")

    }

    public  override fun drive() {
        println("男人会开车")
    }



}


class Woman(name:String):People(name), Driver,Writer{




    override var hairStyle: String="女人长头发"
    override var Skin: String="女人皮肤白"

    override fun niaoniao(): String {
        return "女人蹲着尿尿"
    }

    override fun BodyWeight(): String? {
        return "女人轻"
    }

  public  override fun write() {
        println("女人会写作")

    }

    public  override fun drive() {
        println("女人会开车")
    }

}




//司机
class CarDriver:Driver{
    override fun drive() {
        println("请专业司机开车")

    }
}
//秘书
class PPTWriter:Writer{
    override fun write() {
        println("请秘书做PPT")

    }
}


//by 接口的代理
class SeniorManager(val carDriver: CarDriver, val pptWriter: PPTWriter):Driver by carDriver,Writer by pptWriter




interface Driver{
    fun drive()
}

interface Writer{
    fun write()
}




